| Technical Tips + from the International Helpdesk1. UNIFACE for Windows 95 and OLE supportThe OLE-container Widget under the Windows 95 version of UNIFACE 6.1.dl can contain OLE objects, for example a Word document, an Excel spreadsheet or a bitmap. It is not possible however to assign an object with proc code to an OLE-container/field unless the data is already stored in another field. For example: olefield1 = olefield2. In this case olefield2 should already contain valid data. There are five ways to get data in an OLE-container:
You can see therefore it is not possible to assign an object to a OLE-container via a proc statement but there are several ways to work around it. 2. Using Devicetables on MS-WindowsThis article covers: 1. General layout of a device table. 1. General layout of a devicetable:A devicetable is structured like:
Where:
This will map the UNIFACE internal character A from UNIFACE font 0 to the ASCII value 233.
These modes are all mapped to the ^NUL command on Windows. Example:
When the devicetable above is used to display the UNIFACE internal character 3.A, ^198^233 will be sent to the device. 2. Devicetables for screen display on windows.For screen display on Windows, devicetables are used for the following objects:
The font to display these texts is for the form texts and the unifields, the selected font in the ini file (font0). For window titles, menus and dialog texts, the font is selected by Windows. The select statements are never used in device tables on Windows (have a look in MSwin3). This effectively means that all character mappings can be contained in one set. To see which characters can be displayed with certain fonts, use the program Character Map. When you want to display the UNIFACE internal character 0.C as a ‚ and the used font is Courier, you will need to map 0.C to ^199, because ‚ is 199 in font Courier. Take special care that the font used for window titles, menus and dialog texts is chosen by Windows. This will make it virtually impossible to use foreign characters for these objects unless a foreign version of Windows is used. So, although you can display cyrillic text in an unifield as soon as you will have a cyrillic font available on Windows, you will need a cyrillic version of Windows to display cyrillic text in a Window title (formtitle). An example of a device table which will map the UNIFACE internal character 0.C as a ‚ and the UNIFACE internal character 3.A to a B:
3. Devicetables for printing on WindowsA devicetable which is used for printing on Windows will contain a line:
In the print devicetables the different sets will contain a select statement which will influence the choice of printfont. The three different select commands that exist are:
The font selection will work as follows: First it will be checked whether the selected font in the ini file is of the same type as required by the select statement in the devicetable. If not, a different font will be selected, which is of the type required by the select statement. The Microsoft fonts ‘Courier New’, ‘Courier New CE’ and ‘Courier New Cyr’ are all of the type ANSI. So if your printer font is Courier New Cyr and you want to map the UNIFACE internal character 0.A to character 200 (capital Labda) you will need to have the following mapping:
Some fonts present themselves not as ANSI fonts, but for example as OEM fonts. This will immediately lead to problems. Due to the font selection process, the user will not see what he expects. This situation can only be avoided by changing the devicetable. When for example a cyrillic font is used that presents itself as an OEM font and you would like to map the UNIFACE internal character 0.A to character 200, you will need the following mapping:
3. Sybase Open Client on the MacintoshThe following difficulties can occur when installing/ using UNIFACE and Sybase 10.0.2 on both Macintosh platforms: 1 Wrong version of the Apple Shared Library Manager: If your widgets work fine, you don’t have this problem. 2 Wrong version of the Sybase driver in the extensions folder: You can even have multiple versions of the Sybase driver, giving you this message ‘unable to load ... ’. 3 Sybase Client software not correctly installed: Unfortunately checking with dbping doesn’t guarantee a correct installation for use with UNIFACE. Advised procedure:
4. Here is some additional information for getting UNIFACE to work with Sybase. To get it to work it is mandatory to: a) Have an absolutely clean environment for installation. * * Before Sybase and UNIFACE can be installed, all files that are part of an older version have to be removed. (For Sybase, the Sybase config (control panels) and the libraries with extension 10.02) (For UNIFACE the complete UNIFACE folder, including the preferences) * * When Sybase is installed either the Power PC version or 64K version must be installed; NOT both. When UNIFACE is installed a full install has to be performed, including entering the SEK. *** You must put the Sybase Shared Libraries in the extensions folder yourself, the Sybase installation program does not do this. If these libraries are not in the extensions folder, sybping will work, however UNIFACE will say ‘You have no library that implements the 3GL function udbsyb’. |